home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / addsysvar.pro next >
Text File  |  1997-07-08  |  2KB  |  58 lines

  1. ; $Id: addsysvar.pro,v 1.2 1997/01/15 04:02:19 ali Exp $
  2. ;
  3. ; Copyright (c) 1990-1997, Research Systems, Inc.  All rights reserved.
  4. ;       Unauthorized reproduction prohibited.
  5.  
  6. pro ADDSYSVAR, Name, Type, String_length
  7. ;+
  8. ; NAME:
  9. ;    ADDSYSVAR
  10. ;
  11. ; PURPOSE:
  12. ;    ADDSYSVAR allows the user to define new system variables. 
  13. ;    It was a built in procedure under version 1 VMS, and is superceeded
  14. ;    by DEFSYSV. It is provided in this form to help users of that version
  15. ;    adapt to version 2.
  16. ;
  17. ; CALLING SEQUENCE:
  18. ;    ADDSYSVAR, Name, Type [, String_length]
  19. ;
  20. ; INPUTS:
  21. ;    Name:  The name of the system variable. This variable must be a scalar
  22. ;           string starting with the "!" character.
  23. ;
  24. ;    Type:  The type of the system variable expressed as a one character
  25. ;           string. The following values are valid: 'B' for byte, 'I' for
  26. ;           integer, 'L' for longword, 'F' for floating-point, 'D' for 
  27. ;           double-precision floating-point, and 'S' for string.
  28. ;
  29. ;    String_length:  This parameter is ignored.
  30. ;
  31. ; OUTPUT:
  32. ;    A new system variable is created, if possible.
  33. ;
  34. ; RESTRICTIONS:
  35. ;    DEFSYSV is a much better interface for creating system variables,
  36. ;    and should be used instead.
  37. ;
  38. ; REVISION HISTORY:
  39. ;    10 January 1990
  40. ;-
  41.  
  42.   on_error,2                      ;Return to caller if an error occurs
  43.  
  44.  
  45.   case strupcase(type) of 
  46.     'B' : value = 0B
  47.     'I' : value = 0
  48.     'L' : value = 0L
  49.     'F' : value = 0.0
  50.     'D' : value = 0D
  51.     'S' : value = ''
  52.     ELSE : message, "Unknown value for Type argument."
  53.   endcase
  54.  
  55.   DEFSYSV, name, value
  56.  
  57. end
  58.